<template>
  <div class="box">
    <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
      <van-swipe-item v-for="(item, index) in this.list" :key="index">
        <img :src="item.bannerUrl" alt="" />
      </van-swipe-item>
    </van-swipe>
  </div>
</template>

<script>
import { banner_list } from "../../../api";
export default {
  mounted() {
    banner_list().then((res) => {
      console.log(res.data.list);
      this.list = res.data.list;
    });
  },
  data() {
    return {
      list: [],
    };
  },
};
</script>

<style scoped>
.box {
  margin: 10px;
}
.box .my-swipe img{
  width: 100%;
  border-radius: 5px;
}
.tu {
  width: 100%;
  height: 80px;
  background-color: blueviolet;
}
</style>